package com.kehutong.payfees.admin.treasure;

//import com.kehutong.payfees.entity.treasure.OrganAccount;
//import com.kehutong.payfees.enums.IdType;
//import com.kehutong.payfees.service.treasure.ESignTreasureOrganAccountServiceImpl;
//import org.coraframework.authz.HasPermission;
//import org.coraframework.inject.Inject;
//import org.coraframework.json.JSONObject;
//import org.coraframework.mvc.MvcAction;
//import org.coraframework.mvc.http.Bean;
//import org.coraframework.mvc.http.ReqMapping;
//import org.coraframework.mvc.http.result.Result;
//import org.coraframework.util.EnumUtil;
//
//import java.util.Arrays;
//
///**
// * e签宝 机构账号
// *
// */
//
//@MvcAction
//@ReqMapping("/admin/sign/treasure/account/organ")
//public class ESignTreasureOrganAccountController {
//
//    @Inject
//    private ESignTreasureOrganAccountServiceImpl eSignTreasureOrganAccountService;
//
//
//    @HasPermission("charge:organ:view")
//    @ReqMapping("/page")
//    public Object pageOrganAccount(JSONObject jsonObject) {
//        return Result.success(eSignTreasureOrganAccountService.pageOrganAccount(jsonObject));
//    }
//
//    @Bean(newInstance=true, copy=true)
//    @HasPermission("charge:organ:edit")
//    @ReqMapping("/create")
//    public Object createOrganAccount(OrganAccount organAccount, JSONObject jsonObject) throws Exception {
//        JSONObject idType = jsonObject.getJSONObject("idType");
//        organAccount.setIdType(EnumUtil.getEnum(IdType.class, idType.getString("id")));
//        eSignTreasureOrganAccountService.createOrganAccount(organAccount);
//        return Result.success();
//    }
//
//    @HasPermission("charge:organ:view")
//    @ReqMapping("/get")
//    public Object geOrganAccount(String id) {
//        return Result.success(eSignTreasureOrganAccountService.getOrganAccount(id));
//    }
//
//    @Bean(newInstance=false, copy=true)
//    @HasPermission("charge:organ:edit")
//    @ReqMapping("/update")
//    public Object updateOrganAccount(OrganAccount organAccount) throws Exception {
//        eSignTreasureOrganAccountService.updateOrganAccount(organAccount);
//        return Result.success();
//    }
//
//    @HasPermission("charge:organ:edit")
//    @ReqMapping("/delete")
//    public Object deleteOrganAccount(String orgId) throws Exception {
//        eSignTreasureOrganAccountService.deleteOrganAccount(orgId);
//        return Result.success();
//    }
//
//    @HasPermission("charge:organ:view")
//    @ReqMapping("/get/enum")
//    public Object getIdTypeEnum() {
//        return Result.success(Arrays.asList(IdType.values()));
//    }
//}
